package com.smartleanx.module.hrm.dal.mysql.examine.examineRecordRater;

import java.util.*;

import com.smartleanx.framework.common.pojo.PageResult;
import com.smartleanx.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.smartleanx.framework.mybatis.core.mapper.BaseMapperX;
import com.smartleanx.module.hrm.dal.dataobject.examine.examineRecordRater.ExamineRecordRaterDO;
import org.apache.ibatis.annotations.Mapper;
import com.smartleanx.module.hrm.controller.admin.examine.examineRecordRater.vo.*;

/**
 * 评分人关联 Mapper
 *
 * @author 
 */
@Mapper
public interface ExamineRecordRaterMapper extends BaseMapperX<ExamineRecordRaterDO> {

    default PageResult<ExamineRecordRaterDO> selectPage(ExamineRecordRaterPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ExamineRecordRaterDO>()
                .eqIfPresent(ExamineRecordRaterDO::getRaterFraction, reqVO.getRaterFraction())
                .eqIfPresent(ExamineRecordRaterDO::getRaterStatus, reqVO.getRaterStatus())
                .eqIfPresent(ExamineRecordRaterDO::getAppealReason, reqVO.getAppealReason())
                .eqIfPresent(ExamineRecordRaterDO::getRejectReason, reqVO.getRejectReason())
                .eqIfPresent(ExamineRecordRaterDO::getRaterComment, reqVO.getRaterComment())
                .eqIfPresent(ExamineRecordRaterDO::getScorerOrder, reqVO.getScorerOrder())
                .eqIfPresent(ExamineRecordRaterDO::getRaterWeight, reqVO.getRaterWeight())
                .eqIfPresent(ExamineRecordRaterDO::getRaterGradeId, reqVO.getRaterGradeId())
                .eqIfPresent(ExamineRecordRaterDO::getExamineId, reqVO.getExamineId())
                .orderByDesc(ExamineRecordRaterDO::getId));
    }

}